<?php 
    session_start();
	if (isset($_COOKIE['userid']) && isset($_COOKIE['usermd5']))
	{
		require('config.php');
		$stmt = $connection->prepare('update user_id_passwd set cookie=0 where id=?');
		$stmt->bind_param("s", $_COOKIE['userid']);
		$stmt->execute();
		setcookie("userid"); 
		setcookie("usermd5");
	}
    $_SESSION['login'] = false;
    $_SESSION['gate'] = 1;
	header("location: anonymous.php");
?>
